package cn.Jackpy.FactoryPattern;

/**
 * @auther: kpy
 * @version: 1.0
 * @Package: cn.Jackpy.FactoryPattern
 * @data: 2024/8/26 21:44
 * @discription:
 **/
public class FactoryMain {
    public static void main(String[] args) throws Exception {
        ShapeInterFace shapeInterFace = new ShapeServiceImpl("circle").getShape();
        shapeInterFace.draw();

        shapeInterFace = new ShapeServiceImpl("square").getShape();
        shapeInterFace.draw();

        shapeInterFace = new ShapeServiceImpl("red").getShape();
        shapeInterFace.draw();

    }
}
